package com.AAA.controller.sds;

import com.AAA.entity.LayData;
import com.AAA.entity.MyPage;
import com.AAA.entity.sds.TSdsRecord;
import com.AAA.entity.sds.TSdsRecordjieguo;
import com.AAA.entity.sds.TSdsRecordren;
import com.AAA.service.sds.TSdsRecordService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * (TSdsRecord)表控制层
 *
 * @author makejava
 * @since 2022-10-29 15:20:05
 */
@RestController
@RequestMapping("tSdsRecord")
public class TSdsRecordController {
    /**
     * 服务对象
     */
    @Autowired
    private TSdsRecordService service;

    @GetMapping("checkUser")
    public LayData checkUser(TSdsRecord record){
        return new LayData(service.checkRecord(record));
    }

    @PostMapping("addRecord")
    public LayData addRecord(TSdsRecord record){
        return new LayData(service.insertRecord(record));
    }


    //分页查询
    @GetMapping("select")
    public  LayData getData(MyPage myPage,TSdsRecord tSdsRecord){
        return  new LayData(service.getall(myPage,tSdsRecord));
    }
    @GetMapping("{id}")
    public LayData getDetailData(@PathVariable Integer id, MyPage myPage){
        return new LayData(service.getDetailMsg(myPage,id));
    }


    @GetMapping("selectcore")
    public  LayData selectcore(MyPage myPage, TSdsRecordjieguo tSdsRecordjieguo){
        return  new LayData(service.selectcore(myPage,tSdsRecordjieguo));
    }


    @GetMapping("selectren")
    public  LayData selectren(MyPage myPage, TSdsRecordren tSdsRecordren){
        return  new LayData(service.selectren(myPage,tSdsRecordren));
    }

}
